package test04;

public class Reg4 {
    public static void main(String[] args) {
        String str="2014-07-15";
        String reg="[0-9]{4}[-]{1}[0-9]{2}[-]{1}[0-9]{2}";
        System.out.println(str.matches(reg));
    }
}
